/**
 * Created by renzhiqiang on 17/5/6.
 */
import {Breadcrumb, Icon} from 'antd';
import React, {PropTypes} from 'react'
import style from './index.less'

function breadCrumb({dispatch, data}) {
  var list = data.map((value, index ) => {
    if (index == data.length - 1) {
      return <Breadcrumb.Item key={index}>{value.item}</Breadcrumb.Item>
    } else {
      return <Breadcrumb.Item key={index}><a href=""><Icon type="home" />{value.item}</a></Breadcrumb.Item>
    };
  });
  return (
    <Breadcrumb className={style.normal}>
      {list}
    </Breadcrumb>
  )
};
export default breadCrumb
